<?php

namespace App\Http\Controllers\Api\Client;

use App\Http\Controllers\Controller;
use App\Models\Api\WorkMessage;
use Illuminate\Http\Request;

class SystemController extends Controller
{
    //获取用户系统信息
    /**
     *
     * @param Request $request
     * @return array
     * 获取用户系统信息
     * php artisan make:controller /Api/Client/Favorites
     */
    public function getUserSystemMessages(Request $request){
        $uid=$request->input('id');
        if (empty($uid)){
            return ['code'=>30304,'msg'=>'登录失效','data'=>''];
        }
        $UserSystemInifData=WorkMessage::getUserSystemInif($uid);
        if (empty($UserSystemInifData)){
            return ['code'=>30304,'msg'=>'没有消息','data'=>''];
        }
        return ['code'=>30200,'msg'=>'获取成功','data'=>$UserSystemInifData];

    }
}
